<template>
	<div class="user">
		<van-nav-bar :title="title" fixed left-arrow @click-left="back" />
		<div class="content">
			<div class="list-group" v-for="(p,item) in pages" :key="item">
				<div v-if="p.name == title">
					<van-cell :title="l.name" v-for="(l,index) in p.attr" :key="index" :to="l.url"></van-cell>
				</div>

			</div>
		</div>

	</div>
</template>

<script>
	export default {
		name: "Safe",
		components: {

		},
		data() {
			return {
				title: this.$route.query.title,
				pages: [{
						name: "安全设置",
						attr: [{
								name: "修改手机号",
								url: "/modify?title=修改手机号"
							},
							{
								name: "修改密码",
								url: "/modify/password?title=修改密码"
							}
						]
					},
					{
						name: "我的文章",
						attr: [{
								name: "文章列表",
								url: "/articleList?title=文章"
							},
							{
								name: "发布文章",
								url: "/release?type=new"
							},
							{
								name: "收藏文章",
								url: "/articleList?title=收藏文章"
							}
						]
					},
					{
						name: "投票评议",
						attr: [{
								name: "人员选举",
								url: "/"
							},
							{
								name: "活动投票",
								url: "/"
							}
						]
					},
					{
						name: "用户认证",
						attr: [{
							name: "站长认证",
							url: "/stationauth?title=站长认证"
						},
						{
							name: "房产认证",
							url: "/houseauth?title=房产认证"
						}
						]
					},
					{
						name: "卜咚问答",
						attr: [{
							name: "我的提问",
							url: "/myask?title=我的提问"
						}]
					}
				]
			}
		},
		methods: {
			back() {
				this.$router.push({
					name: "user"
				})
			}
		}


	}
</script>

<style scoped lang="less">
	.user {
		padding-top: 46px;
		.content{
			margin-top: 0.59rem;
		}

	}
</style>
<style lang="less">
	.user {
		.van-cell {
			padding: 1.19rem 1.03rem;
			font-size: 0.94rem;
			font-family: PingFang SC;
			font-weight: 500;
			color: #000;
		}

		.van-nav-bar .van-icon {
			color: #000;
		}

	}
</style>
